package com.rslai.base.tool.servertest.objectfactory;

import java.lang.reflect.Type;

public class FloatFactory extends InstanceFactory {
    protected Object create(Type type, Object value) {
        if (value == null) {
            return type.equals(Float.TYPE) ? Float.valueOf(0.0F) : null;
        }
        return Float.valueOf(value.toString());
    }

    protected boolean support(Type type) {
        return (type.equals(Float.class)) || (type.equals(Float.TYPE));
    }
}

